{% extends 'layout.html' %}

{% block css %}
<style>
    *{ margin:0; padding:0; list-style:none;}
    a{ text-decoration:none;}
    a:hover{ text-decoration:none;}
    .tcdPageCode{padding: 15px 20px;text-align: left;color: #ccc;text-align:center;}
    .tcdPageCode a{display: inline-block;color: #428bca;display: inline-block;height: 25px;    line-height: 25px;
    padding: 0 10px;border: 1px solid #ddd;    margin: 0 2px;border-radius: 4px;vertical-align: middle;}
    .tcdPageCode a:hover{text-decoration: none;border: 1px solid #428bca;}
    .tcdPageCode a.active{display: inline-block;height: 25px;line-height: 25px;padding: 0 10px;margin: 0 2px;color:
    #fff;background-color: #428bca;    border: 1px solid #428bca;border-radius: 4px;vertical-align: middle;}
    .tcdPageCode a.disabled{    display: inline-block;height: 25px;line-height: 25px;padding: 0 10px;margin: 0 2px;
    color: #bfbfbf;background: #f2f2f2;border: 1px solid #bfbfbf;border-radius: 4px;vertical-align: middle;}
</style>
{% endblock %}

{% block content %}
    {% load my_tags %}
    <div class="panel panel-primary">
        <div class="panel-heading text-center">
            <h3 class="panel-title">客户跟踪表</h3>
        </div>
        <div class="panel-body">
            <table class="table table-striped table-bordered table-hover">
                <tr>
                    <td>序号</td>
                    <td>ID</td>
                    <td>客户</td>
                    <td>内容</td>
                    <td>状态</td>
                    <td>跟进人</td>
                    <td>日期</td>
                    <td>操作</td>
                </tr>
                {% for follow in follow_list %}
                    <tr>
                        <td>{{ forloop.counter }}</td>
                        <td>{{ follow.pk }}</td>
                        <td>{{ follow.customer }}</td>
                        <td>{{ follow.note }}</td>
                        <td>{{ follow.get_status_display }}</td>
                        <td>{{ follow.consultant }}</td>
                        <td>{{ follow.date }}</td>
                        <td>
                            <a href="{% reverse_url request 'edit_follow' follow.pk %}"
                               class="btn btn-primary btn-sm">编辑</a>
                        </td>
                    </tr>
                {% endfor %}
            </table>
            <a href="{% reverse_url request 'add_follow' customer_id %}" class="btn btn-success btn-sm">新增</a>
            <div class="tcdPageCode">
                {{ page_html }}
            </div>
        </div>
    </div>
{% endblock %}